package com.mathdroid.modules;

/**
 * An event occurs after trying to execute an ability.
 */
public final class SimulationEvent {

	/**
	 * After a successful execution there might be a GlobalCoolDown, 
	 * an activation (cast) time or a channel time.
	 * Some abilities do not cause a GCD. Generally speaking this is the 
	 * duration for how long we can't execute anything after execution.
	 * This time may vary for alacrity (haste) rating etc.
	 */
	private double idleTimeMs = 0d;
	
	/**
	 * The result of the execution. This may be a miss, hit, critical hit etc.
	 */
	private EExecutionResult result = null;

	/**
	 * Create a new event.
	 * @param r The result of the invocation.
	 * @param d The idle time after the event.
	 */
	public SimulationEvent(final EExecutionResult r, final double d) {
		this.idleTimeMs = d;
		this.result = r;
	}

	/**
	 * Default Constructor.
	 */
	public SimulationEvent() { }

	/**
	 * @param i the idleTimeMs to set
	 */
	public void setIdleTimeMs(final double i) {
		this.idleTimeMs = i;
	}

	/**
	 * @return the idleTimeMs
	 */
	public double getIdleTimeMs() {
		return idleTimeMs;
	}

	/**
	 * @param r the result to set
	 */
	public void setResult(final EExecutionResult r) {
		this.result = r;
	}

	/**
	 * @return the result
	 */
	public EExecutionResult getResult() {
		return result;
	}
}
